

package cn.shengchao.examstar.rpc.distribute.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: examstarapi
 * @description: 分销角色
 * @author: Xiong weiqiang
 * @create: 2025-03-25 10:22
 */
@Getter
@AllArgsConstructor
public enum DistributeTypeEnum {
    TYPE_YGSX(0, "平台"), TYPE_CTPD(1, "内容生产"), TYPE_SALE(2, "营销体系"),;

    private final int type;
    private final String description;

    public static DistributeTypeEnum getByType(int type) {
        for (DistributeTypeEnum distributeTypeEnum : DistributeTypeEnum.values()) {
            if (distributeTypeEnum.getType() == type) {
                return distributeTypeEnum;
            }
        }
        return null;
    }
}